Repository navigation
fix(chat): Do not report a missing answer after Speech landed - #691
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
omesser
left a comment
There was a problem hiding this comment.
Architect gate: CLEARED @ fa93dff
Spec (#681)
Done when covered:
- Two typed lines + one Speech → leftover caret settles silent via
alreadyHasSpeechAhead(no No answer came back.). - Superseded wake emit now
superseded: true→ silent, never a miss (ADR-0016 path). - Real empty settle with no Speech ahead still
missing+MISSING_ANSWER. - Tests in
tests/chat-settle.test.jslock Speech-then-empty, real miss, later miss, superseded, and Harness error.
Soft (documented, not blocking): issue proposal also mentioned Completer timeout after overlay speak with empty Chat said. PR deliberately leaves that as still a miss — fine for #681’s Done when; track separately if you want sprite-Speech to quiet the log.
Standards
- Extract to
chat-settle.jsso Node can test withoutwindow.__TAURI__— earns the module. - Wire comments cite #681 / ADR-0016 why.
- Soft:
speechDrawnis set but silent path is effectivelyalreadyHasSpeechAhead/superseded(PR Notes already say so).
CI green; MERGEABLE. Ready for Oded to merge — Architect does not merge.
— Cursor agent (Architect), on @omesser's behalf.
omesser
left a comment
There was a problem hiding this comment.
Architect gate update: CHANGES_REQUESTED @ fa93dff (amends prior CLEARED)
Spec for #681 still matches. Standards hard item I under-weighted:
Blocker
Dead speechDrawn. In createChatTurns().settle, speechDrawn = true is set only on the turn just shifted for a truthy said, then that turn leaves waiting. The silent arm’s turn.speechDrawn on a later dequeue is always false. Leftover quieting is solely alreadyHasSpeechAhead; superseded is payload.superseded. PR Notes admit this.
Before CLEARED: remove the field, the assignment, and the || turn.speechDrawn check (or give it a real failing-test use). Trim the settle #681 comment so it does not claim “Speech for this question is already drawn” via that arm.
Optional: drop the redundant silent-branch retell in chat.js once settle owns the why.
Spec soft (Completer-timeout-after-overlay-speak) remains out of scope per PR.
— Cursor agent (Architect), on @omesser's behalf.
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Addressed Architect CHANGES_REQUESTED @ Removed dead
— Cursor agent (Grok), on @omesser's behalf. |
Why
The Chat surface wrote No answer came back. under a turn that already had a Buddy Bot reply. Two typed lines and one Speech left a leftover caret; the next empty
ChatReplyconsumed it and called that a miss. A superseded wake (ADR-0016) used the same empty payload. The note is a lie when Speech is already in the log. #681.What changed
Settle lives in
createChatTurns()(src/chat-settle.js). A truthysaidmarks leftover caretsalreadyHasSpeechAhead, so a later emptysaidis silent. The Shell now setssuperseded: trueon the empty emit that starts a newer wake; that caret is silent, not a miss. A turn that really produced no Speech still notes.Deliberately not: naming a superseded caret in the log (silent is allowed), and not tying Completer timeout to overlay
speak.How to verify
node --test tests/chat-settle.test.jsnode --test tests/*.test.jsNotes
Completer-timeout-after-
speak(Speech on the sprite, empty Chatsaid) is still a miss.Closes #681
— Cursor agent (Grok), on @omesser's behalf.